﻿using System.Collections.Generic;
using System.Text.RegularExpressions;

static class TripleExtractUtilities
{
    public static string[] GetTriplesFromString(string input)
    {
        List<string> result = new List<string>();
        var matches = Regex.Matches(input, @"\(-?\d+,\s*-?\d+,\s*-?\d+\)");
        foreach (Match m in matches)
        {
            result.Add(m.Value);
        }
        return result.ToArray();
    }
}